﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Web;
using System.Web.Mvc;


namespace LaxCraft.Domain
{
	public class Post : EntityBase
	{

        [Required(ErrorMessage = "Title is required.")]
        public virtual string Title { get; set; }

        [Required(ErrorMessage = "Body is requried.")]
        public virtual string Body { get; set; }

        public virtual string Tags { get; set; }

        [Required(ErrorMessage = "Created By is required.")]
        public virtual string CreatedBy { get; set; }

        public virtual DateTime CreatedOn { get; set; }

        public virtual string GetHtml()
        {
            return HttpUtility.HtmlEncode(Body);            
        }
	}
}